import { _decorator, Component, find, Node, v3 } from 'cc';
const { ccclass, property } = _decorator;

@ccclass('jg')
export class jg extends Component {

    player:Node = null
    decon:number = 60
    
    start() {
        this.player = find('Canvas/MainLogic/Player')
    }

    update(deltaTime: number) {
        this.node.setPosition(this.player.position.x,this.node.position.y,0)
        if(this.decon>0){
            this.decon--
        }else{
            this.node.destroy()
        }
    }
}


